package com.juzipi.demo.controller;

import com.juzipi.demo.service.CatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author juzipi
 * @Date 2021/5/2 10:38
 * @Info
 */
@RestController
@RequestMapping("cat")
public class CatController {

    @Autowired
    private CatService catService;

    @GetMapping("write")
    public String write(){
        catService.write();
        return "SUCCESS";
    }

    @GetMapping("read")
    public String read(){
        catService.read();
        return "成功了那个";
    }


}
